import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import request from '@/utils/request'
import axios from 'axios'
import moment from 'moment'
import Viewer from 'v-viewer' // 点击图片大图预览
import 'viewerjs/dist/viewer.css'
Vue.prototype.moment = moment

Vue.config.productionTip = false

Vue.use(ElementUI, { size: 'mini' })

Vue.use(Viewer)
Viewer.setDefaults({ // 默认样式，可以按需求更改
  Options: { inline: true, button: true, navbar: true, title: true, toolbar: true, tooltip: true, movable: true, zoomable: true, rotatable: true, scalable: true, transition: true, fullscreen: true, keyboard: true, url: 'data-source' }
})
Vue.prototype.request = request
Vue.prototype.$axios = axios

new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate () {
    Vue.prototype.$bus = this // 安装全局事件总线
  }
}).$mount('#app')
